﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style x:Key="{x:Type ListViewItem}" TargetType="ListViewItem">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="Height" Value="Auto"/>
        <Setter Property="Foreground" Value="{DynamicResource DefaultTextForeground}"/>
        <Setter Property="BorderBrush" Value="Black"/>
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListViewItem">

                    <Border 
                          Name="Border"
                          Padding="2"
                          SnapsToDevicePixels="true"
                          Background="Transparent" 
                          BorderBrush="{DynamicResource DefaultBorder}" 
                          BorderThickness="0,1,0,0" >
                        <GridViewRowPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" OpacityMask="{x:Null}" Margin="0,0,0,0"/>
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource OnPressBackground}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource DefaultTextForeground}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource OnMouseOverBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>